#version 120
#extension GL_EXT_geometry_shader4 : enable
//varying in float subdiv[1];
//varying in float offset[1];

void main(void)
{
	float offset = 1;
	vec4 temp_Position;

		gl_FrontColor = gl_FrontColorIn[0];
		temp_Position = gl_PositionIn[0];
		gl_Position = gl_ModelViewProjectionMatrix * temp_Position ;
		EmitVertex();

		gl_FrontColor = vec4(1,0,0,1);
		//temp_Position = gl_PositionIn[0];
		gl_Position = gl_ModelViewProjectionMatrix * (temp_Position+vec4(offset/2,0,0,0));
		EmitVertex();

		gl_FrontColor = vec4(1,0,0,1);
		//temp_Position = gl_PositionIn[0];
		gl_Position = gl_ModelViewProjectionMatrix * (temp_Position+vec4(0,offset/2,0,0));
		EmitVertex();

		EndPrimitive();

}